package com.example.demo.service;

import com.example.demo.mapper.MessageInfoMapper;
import com.example.demo.model.MessageInto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MessageService {
    @Autowired
    public MessageInfoMapper messageInfoMapper;

    public Integer publishMessage(MessageInto messageInto) {
        return  messageInfoMapper.insertMessage(messageInto);
    }

    public List<MessageInto> getMessageList() {
        return messageInfoMapper.selectAllList();
    }
}
